use std::time::Instant;

pub struct Benchmark {
    named_timers: Vec<NamedTimer>,
}
impl Benchmark {
    pub fn init() -> Self{
        Self { named_timers: Vec::new() }
    }
}
pub struct NamedTimer {
    name: &'static str,
    start: Option<Instant>,
    end: Option<Instant>,
}
impl NamedTimer {
    pub fn start(name: &'static str) -> Self{
        Self { 
            name, 
            start: Some(Instant::now()),
            end: None,
        }
    }
    pub fn end(&mut self){
        self.end = Some(Instant::now());
    }
}